<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <!-- http://note.cn1.utools.club/server -->
    昵称: <input type="text"><br>
    信息: <textarea name="" id="" cols="30" rows="10"></textarea><br>
    <button id="sendBtn">发送</button>

    <script>
        let sendBtn = document.getElementById('sendBtn');
        //绑定事件
        sendBtn.addEventListener('click', function(){
            //获取用户输入的昵称
            let nickname = document.querySelector('input').value;
            //获取用户输入的消息
            let content = document.querySelector('textarea').value;
            const xhr = new XMLHttpRequest();
            xhr.open('GET', `http://note.cn1.utools.club/server?nickname=${nickname}&message=${content}`);
            xhr.send();
        });
    </script>
</body>
</html>